<%@ LANGUAGE="VBSCRIPT" %>
<%'  ------------------------------------------------------------
  '  mz_NewMVProp.asp 
  '  ------------------------------------------------------------
  '  VCS INFO:
  '  
  '  $Revision:   1.10  $
  '  $Date:   08 Oct 1998 16:04:06  $
  '  $Author:   rurman  $
  '  $Workfile:   mz_newMVProp.asp  $
  '  ------------------------------------------------------------
  '  All Rights Reserved.  Copyright (c) 1988-1998 FileNET Corp.
  '  ------------------------------------------------------------
  '%>
<!-- #include file="islogon.asp" -->
<!-- #include file="jscriptfix.asp" -->
<!-- #include file="checkutil.asp" -->

<%
DebugFlag = 0

PropName  = Request.Form("PropToModify")
PropType = CInt(Request.Form("Type"))

'Panagon IDM Web application uses the Session variable LibraryLogonID to keep track of
'whether the user has logged on.
'Please see logoncall.asp to see how the Session variable LibraryLogonID is set.
LibraryLogonID = Session("LibraryLogonID")
set LibraryObj = Server.CreateObject("IDMObjects.Library")
LibraryObj.LogonID = LibraryLogonID

%>

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html">
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>Property Modify</title>
</head>

<body bgcolor="#FFFFFF">
<% if DebugFlag then %>
PropName = <%=PropName%>
<%end if %>
<%

' Get object for the current property desc
set PropDesc = LibraryObj.GetObject(Application("idmObjTypePropDesc"), PropName, Application("idmObjTypeDocument") ) 

%>
<br>
<H3> Set Values for Property: "<%=PropDesc.Label %>" </H3>

<form name="property" action="adddoccontent.asp" method="POST" target="View">

    <input type="hidden" name="Type" value="<%= ObjType %>">
    <input type="hidden" name="PropToModify" value="<%= PropName %>">
        
<table cellpadding="0" cellspacing="1">
    <% ' ======================
    ' Allow to add 5 values for this property
    ' Values are sent in pairs of "propName=newValue"
    addStr = UCase(PropDesc.Name)
    for i=1 to 5
        FieldSize = PropDesc.Size
    %>
        <tr>
        <td width="100%">
        <input type="text" size=100 name="<%= addStr %>"
            <% if FieldSize > 0 then %> maxlength=<%= FieldSize %>  <% end if %>
            <% if i <= Request.Form(addStr).Count then %> value="<%=Request.Form(addStr)(i)%>"
            <% else %> value="" <% end if %>
            
            <% if PropDesc.TypeID = Application("idmTypeDate") then %>
            onBlur="CheckDate(this, '<%=value%>')"
            <% elseif PropDesc.TypeID = Application("idmTypeUnsignedShort") or PropDesc.TypeID = Application("idmTypeUnsignedLong") _
                or PropDesc.TypeID = Application("idmTypeLong") or PropDesc.TypeID = Application("idmTypeShort") _ 
                or PropDesc.TypeID = Application("idmTypeSingle") then %>
            onBlur="CheckInteger(this, '<%=value%>')"
            <% end if %>
            >
        </td>
        </tr>
    <%
    

    next
    %>

</table>
<br>
<table border="0" cellpadding="0" cellspacing="1">
    <tr>
    <td width="30" valign=bottom align=right></td>
    <td>
    <% if not IsVirtual then %>
    <a href="javascript:Return()"><img alt="Return to Modify Properties" src="images/return.gif" align=bottom border=0 width=41 height=40></a><em><strong>Return</strong></em>
    <% end if %>
    </td>
    </tr>
</table>


<% 
' Pass all the form elements
For Each x In Request.Form %>
<%  
    ' if not (Request.Form(x) = "") then ' pass also null strings
        if x<>addStr then
%>
<% if DebugFlag then %>
INP hidden x= <%= x %>, addStr = <%= Request.Form(x) %><br>
<% end if %>
<%
            For k=1 to Request.Form(x).Count
%>
<INPUT TYPE=hidden name="<%= x %>" value="<%= Request.Form(x)(k) %>">
<%      
            next
        end if 
    ' end if
   Next %>

<input type="hidden" name="UpdateFlag" value="1">
</form>


<SCRIPT LANGUAGE="JavaScript">
<!--

function Return()
{
    // Parse the delete checkboxes
    // Parse the new values
    // No MORE button for now
    document.property.UpdateFlag.value = "1";
    document.property.submit();
}
//-->
</SCRIPT>

&nbsp;<br>
</body>
</html>
